//
//  Constants.h
//  Cinderella
//
//  Created by mac on 15/5/20.
//  Copyright (c) 2015年 cloudstruct. All rights reserved.
//

#import <Foundation/Foundation.h>

/** DEBUG LOG **/
#ifdef DEBUG
#   define DTLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ## __VA_ARGS__);
#else
#   define DTLog(...)
#endif

/** DEBUG LOG **/

#define DEBUG_SHOW_API NO

#define WEAKSELF typeof(self) __weak weakSelf = self;
#define STRONGSELF typeof(weakSelf) __strong strongSelf = weakSelf;
#define FRAME(x,y,w,h) CGRectMake(x,y,w,h)

#define rad(angle) ((angle) / 180.0 * M_PI)

#define SHOW_ALERT(_TITLE_)  UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:_TITLE_ delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];\
[alert show];

#define IOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0) && ([[UIDevice currentDevice].systemVersion doubleValue] <= 8.0)

#define DTColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define DTRandomColor DTColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))


#define CDRViewHeight [[UIScreen mainScreen] bounds].size.height
#define CDRViewWidth  [[UIScreen mainScreen] bounds].size.width

#define CDRHeightScale CDRViewHeight/667
#define CDRWidthScale CDRViewWidth/375

#define Angle2Radian(angle) ((angle) / 180.0 * M_PI)


#define NAV_BAR_HEIGHT              64


#define isIphone5       CDRViewHeight == 568

#define isIphone4s      CDRViewHeight == 480

#define isIPhone6       CDRViewHeight == 667

#define isIPHONE_6PLUS  CDRViewHeight == 736


typedef NS_ENUM(NSInteger, ShowType)
{
    ShowTypePush, // push方式展示
    ShowTypeModal
};


extern NSString *const kModuleCertId;
